package sanrenxing.dayEnd.backRepertoryTotal.utils;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
public class WelComePage extends WebMvcConfigurerAdapter {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //设置访问页面,如果为/则直接进入login页面
        registry.addViewController("/").setViewName("/html/Login.html");
        //设置访问页面,如果为/html/则直接进入login页面
        registry.addViewController("/html/").setViewName("/html/Login.html");
        //设置优先级
        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
        super.addViewControllers(registry);
    }
}
